<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title> - 流调任务</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico"> <link href="css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="css/font-awesome.css?v=4.4.0" rel="stylesheet">

    <link href="css/animate.css" rel="stylesheet">
    <link href="css/style.css?v=4.1.0" rel="stylesheet">

</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInUp">
    <div class="row">
        <div class="col-sm-12">

            <div class="ibox">
                <div class="ibox-title">
                    <h4>所有流调任务</h4>
                </div>
                <div class="ibox-content">
                    <div class="row m-b-sm m-t-sm">
                        <div class="col-md-1">
                            <button type="button" href="/epidMissionList" class="btn btn-white btn-sm"><i class="fa fa-refresh"></i> 刷新</button>
                        </div>
                        <div class="col-md-11">
                            <div class="input-group">
                                <input type="text" placeholder="请输入流调任务名称" class="input-sm form-control"> <span class="input-group-btn">
                                        <button type="button" class="btn btn-sm btn-primary" style="background-color:#23B7E5"> 搜索</button> </span>
                            </div>
                        </div>
                    </div>

                    <div class="project-list">

                        <table class="table table-hover">
                            <thead>
                            <tr style="font-family:Microsoft YaHei;color:black;font-size:15px;background-color:#EDFAF9">
                                <td width="5%" align='center' valian='middle'>状态</td>
                                <td width="8%" align='center' valian='middle' >日期</td>
                                <td width="8%"  align='center' valian='middle'>患者姓名</td>
                                <td width="8%"  align='center' valian='middle'>传染病类型</td>
                                <td width="10%"  align='center' valian='middle'>医院</td>
                                <td width="10%"  align='center' valian='middle'>地址</td>
                                <td width="31%"  align='center' valian='middle'>进度</td>
                                <td width="20%"  align='center' valian='middle'>操作</td>
                            </tr>
                            </thead>
                            <tbody>
                                <tr th:each="e:${epidMissionRecordBeans}">
                                    <td class="project-status" th:switch="${e.getMissionState()}" align='center' valian='middle'>
                                        <span th:case="0" class="label label-primary" align='center' valian='middle'>未开始</span>
                                        <span th:case="1" class="label label-primary" align='center' valian='middle'>流调中</span>
                                        <span th:case="2" class="label label-primary" align='center' valian='middle'>流调完成</span>
                                        <span th:case="3" class="label label-default" align='center' valian='middle'>已取消</span>
                                        <span th:case="4" class="label label-finish" align='center' valian='middle'>已完成</span>
                                        <span th:case="5" class="label label-primary" align='center' valian='middle'>二次确认中</span>
                                        <span th:case="6" class="label label-primary" align='center' valian='middle'>确认完成</span>
                                    </td>
                                    <td th:text="${e.getRequestTime()}" align='center' valian='middle'></td>
                                    <td th:text="${e.getPatientName()}" align='center' valian='middle'></td>
                                    <td th:text="${e.getDiseaseName()}" align='center' valian='middle'></td>
                                    <td th:text="${e.getRequestHospital()}" align='center' valian='middle'></td>
                                    <td th:text="${e.getAssignPlace()}" align='center' valian='middle'></td>
                                    <td class="project-completion" th:switch="${e.getMissionState()}">
                                        <small th:case="0">当前进度： 0%</small>
                                        <small th:case="1">当前进度： 20%</small>
                                        <small th:case="2">当前进度： 40%</small>
                                        <small th:case="3">当前进度： 100%</small>
                                        <small th:case="4">当前进度： 100%</small>
                                        <small th:case="5">当前进度： 60%</small>
                                        <small th:case="6">当前进度： 80%</small>
                                        <div class="progress progress-mini" th:switch="${e.getMissionState()}">
                                            <div th:case="0" style="width: 0%;" class="progress-bar"></div>
                                            <div th:case="1" style="width: 20%;" class="progress-bar"></div>
                                            <div th:case="2" style="width: 40%;" class="progress-bar"></div>
                                            <div th:case="3" style="width: 100%;" class="progress-bar"></div>
                                            <div th:case="4" style="width: 100%;" class="progress-bar"></div>
                                            <div th:case="5" style="width: 60%;" class="progress-bar"></div>
                                            <div th:case="6" style="width: 80%;" class="progress-bar"></div>
                                        </div>
                                    </td>
                                    <td class="project-actions" align='center' valian='middle'>
                                        <a th:href="@{'/epidMissionDetails?missionId='+${e.getMissionId()}}" class="btn btn-white btn-sm" ><i class="fa fa-folder"></i> 任务详情 </a>
                                        <a th:href="@{'/epidRecordManage?missionId='+${e.getMissionId()}}" class="btn btn-white btn-sm"><i class="fa fa-pencil"></i> 任务发布 </a>
                                    </td>
                                    <!--<td>-->
                                        <!--<a onclick="redirToCodeRuleInfo()" class="btn btn-primary btn-sm ">规则详情</a>-->
                                    <!--</td>-->
                                </tr>

                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 全局js
<script src="js/jquery.min.js?v=2.1.4"></script>
<script src="js/bootstrap.min.js?v=3.3.6"></script>


<!-- 自定义js -->
<script src="js/content.js?v=1.0.0"></script>


<script>
    $(document).ready(function(){

        $('#loading-example-btn').click(function () {
            btn = $(this);
            simpleLoad(btn, true)

            // Ajax example
//                $.ajax().always(function () {
//                    simpleLoad($(this), false)
//                });

            simpleLoad(btn, false)
        });
    });

    function simpleLoad(btn, state) {
        if (state) {
            btn.children().addClass('fa-spin');
            btn.contents().last().replaceWith(" Loading");
        } else {
            setTimeout(function () {
                btn.children().removeClass('fa-spin');
                btn.contents().last().replaceWith(" Refresh");
            }, 2000);
        }
    }
</script>



</body>
</html>
